package c.h.a.j0;

import c.h.a.m0.h;
import c.h.a.m0.k;
import com.liuzh.deviceinfo.DeviceInfoApp;
import java.io.File;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/* compiled from: TabManager */
public class u0 {
    public static final List<b> a;
    public static final Map<Class<? extends h0>, b> b;
    public static final Map<String, b> c;

    /* compiled from: TabManager */
    public static final class b {
        public final Class<? extends h0> a;
        public final String b;
        public final String c;

        public b(Class cls, String str, String str2, a aVar) {
            this.a = cls;
            this.b = str;
            this.c = str2;
        }
    }

    static {
        List<b> asList = Arrays.asList(new b[]{new b(n0.class, b(2131690434), "TAB_DASHBOARD", null), new b(o0.class, b(2131690435), "TAB_DEVICE", null), new b(y0.class, b(2131690426), "TAB_SYSTEM", null), new b(m0.class, b(2131690433), "TAB_CPU", null), new b(q0.class, b(2131690436), "TAB_GPS", null), new b(v0.class, b(2131690124), "TAB_NETWORK", null), new b(x0.class, b(2131690403), "TAB_STORAGE", null), new b(k0.class, b(2131689626), "TAB_BATTERY", null), new b(p0.class, b(2131689800), "TAB_DISPLAY", null), new b(l0.class, b(2131689672), "TAB_CAMERA", null), new b(a1.class, b(2131690447), "TAB_THERMAL", null), new b(w0.class, b(2131690324), "TAB_SENSORS", null), new b(i0.class, b(2131689620), "TAB_APPS", null), new b(z0.class, b(2131690451), "TAB_TESTS", null)});
        a = asList;
        HashMap hashMap = new HashMap();
        HashMap hashMap2 = new HashMap();
        for (b bVar : asList) {
            hashMap.put(bVar.a, bVar);
            hashMap2.put(bVar.c, bVar);
        }
        b = Collections.unmodifiableMap(hashMap);
        c = Collections.unmodifiableMap(hashMap2);
    }

    public static List<b> a() {
        ArrayList arrayList = new ArrayList();
        for (b bVar : a) {
            if (!bVar.c.equals("TAB_CAMERA") || !h.p()) {
                if (bVar.c.equals("TAB_THERMAL")) {
                    DecimalFormat decimalFormat = k.a;
                    File file = new File("/sys/devices/virtual/thermal/");
                    Object obj = null;
                    if (file.exists()) {
                        File[] listFiles = file.listFiles();
                        if (!(listFiles == null || listFiles.length == 0)) {
                            obj = 1;
                        }
                    }
                    if (obj == null) {
                    }
                }
                arrayList.add(bVar);
            }
        }
        return arrayList;
    }

    public static String b(int i) {
        return DeviceInfoApp.c.getString(i);
    }
}
